package com.ruoyi.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * Category对象 business_category
 *
 * @author win
 * @date 2021-06-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class Category extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    /** 是否是首页栏目 */
    @Excel(name = "是否是首页栏目")
    private Integer isIndexCategory;

    /** 父级 */
    @Excel(name = "父级")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long parentId;

    /** 栏目名称 */
    @Excel(name = "栏目名称")
    private String title;

    /** 栏目位置 */
    @Excel(name = "栏目位置")
    private Integer position;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sortOrder;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 是否可在后台进行编辑 */
    @Excel(name = "是否可在后台进行编辑")
    private Integer canEdit;

    /** 是否是外链 */
    @Excel(name = "是否是外链")
    private Integer isWebUel;

    /** 外链地址 */
    @Excel(name = "外链地址")
    private String webUrl;

    /** 封面图片 */
    @Excel(name = "封面图片")
    private String cover;

    @Excel(name = "父级栏目名称")
    private String parentName;

    @Excel(name = "是否是叶子结点")
    private boolean leaf;

    @Excel(name = "子级列表")
    private List<Category> children;

    @Excel(name = "子级内容")
    private List<Content> contents;

}

